﻿@inherits Blazorise.TableBody
@if ( ParentTable?.FixedHeader == true )
{
    <div class="ant-table-body" style="@($"overflow-y: scroll; max-height: {(ParentTable?.FixedHeaderTableHeight ?? "300px")};")">
        <table style="table-layout: fixed;">
            <tbody @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames"
                   draggable="@DraggableString"
                   @ondragend="@OnDragEndHandler"
                   @ondragend:preventDefault="@DragEndPreventDefault"
                   @ondragenter="@OnDragEnterHandler"
                   @ondragenter:preventDefault="@DragEnterPreventDefault"
                   @ondragleave="@OnDragLeaveHandler"
                   @ondragleave:preventDefault="@DragLeavePreventDefault"
                   @ondragstart="@OnDragStartHandler"
                   @ondragstart:preventDefault="@DragStartPreventDefault"
                   @ondrop="@OnDropHandler"
                   @ondrop:preventDefault="@DropPreventDefault"
                   @attributes="@Attributes">
                @ChildContent
            </tbody>
        </table>
    </div>
}
else
{
    <tbody @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames"
           draggable="@DraggableString"
           @ondragend="@OnDragEndHandler"
           @ondragend:preventDefault="@DragEndPreventDefault"
           @ondragenter="@OnDragEnterHandler"
           @ondragenter:preventDefault="@DragEnterPreventDefault"
           @ondragleave="@OnDragLeaveHandler"
           @ondragleave:preventDefault="@DragLeavePreventDefault"
           @ondragstart="@OnDragStartHandler"
           @ondragstart:preventDefault="@DragStartPreventDefault"
           @ondrop="@OnDropHandler"
           @ondrop:preventDefault="@DropPreventDefault"
           @attributes="@Attributes">
        @ChildContent
    </tbody>
}